<div id="main-content" >
    <div class="box border green">
        <div class="box-title">
            <h4>
                <i ng-show="toState.name=='opportunitylist'" class="fa fa-book"></i>
                <a ng-show="toState.name!='opportunitylist'" ng-click="back()">
                    <i class="fa fa-arrow-left"></i>
                </a>
                项目机会{{presentOppInfo!=undefined&&toState.name=="opportunitydetail"?">>"+presentOppInfo.opportunity.oppName:""}}
            </h4>
            <div class="tools">
                <button class="btn btn-xs" type="file"  ngf-select="upExcel($file)" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel" ngf-max-height="1000" ngf-max-size="10MB">导入</button>
                <button class="btn btn-xs" ng-click="downExcel()">导出</button>
            </div>
        </div>
        <div class="box-body">
            <div class="row">
                <div class="col-md-3">
                    <div>
                        <div class="box-title text-center" style="margin-bottom:0">
                            <h4 ng-show="toState.name=='opportunitylist'">检索</h4>
                        </div>
                        <div class="box-body">
                            <div class="tabbable header-tabs" ng-show="toState.name!='opportunitylist'">
                                <ul class="nav nav-tabs" ng-init="searchOrGuid==false">
                                    <li class="{{searchOrGuid?'active':''}}"><a ng-click="searchOrGuid=true"><i class="fa fa-search"></i> <span class="hidden-inline-mobile">检索</span></a></li>
                                    <li class="{{!searchOrGuid?'active':''}}"><a ng-click="searchOrGuid=false"><i class="fa fa-circle-o"></i> <span class="hidden-inline-mobile">导航</span></a></li>
                                </ul>
                            </div>
                            <div class="text-center {{toState.name=='opportunitylist'?'':'row'}}" ng-show="toState.name=='opportunitylist'||searchOrGuid">
                                <div class="{{toState.name=='opportunitylist'?'':'col-md-9'}}" style="padding-right: 0">
                                    <input type="text" class="form-control" placeholder="检索" ng-model="filterInfos.name">
                                </div>
                                <div class="{{toState.name=='opportunitylist'?'':'col-md-3'}}" ng-show="toState.name!='opportunitylist'" style="padding-left: 0">
                                    <button ng-init="showMoreSearch=false" class="btn btn-{{showMoreSearch?'success':'default'}}" ng-click="showMoreSearch=!showMoreSearch">条件检索</button>
                                </div>
                            </div>
                            <div ng-show="toState.name=='opportunitylist'||showMoreSearch&&searchOrGuid">
                                <div class="">
                                    <div style="padding-right:0;padding-left: 0;margin-left:0;margin-top: 15px">
                                        <h6 style="margin-left: 0">类型:</h6>
                                    </div>
                                    <div class="btn-group" style="margin-left: 0;margin-right: 0" >
                                        <a style="padding-right: 9px;padding-left: 9px" class="btn btn-{{filterInfos.one.a?'primary':'default'}}" ng-click="filterInfos.one.a=!filterInfos.one.a">LOST</a>
                                        <a style="padding-right: 9px;padding-left: 9px" class="btn btn-{{filterInfos.one.b?'info':'default'}}" ng-click="filterInfos.one.b=!filterInfos.one.b">WIN</a>
                                        <a style="padding-right: 9px;padding-left: 9px" class="btn btn-{{filterInfos.one.c?'danger':'default'}}" ng-click="filterInfos.one.c=!filterInfos.one.c">OPEN</a>
                                    </div>
                                </div>
                                <div class="">
                                    <div style="padding-right:0;padding-left: 0;margin-left:0;margin-top: 15px">
                                        <h6 style="margin-left: 0">状态:</h6>
                                    </div>
                                    <div class="btn-group" style="margin-left: 0;margin-right: 0" >
                                        <a style="padding-right: 10px;padding-left: 10px" class="btn btn-{{filterInfos.two.a?'success':'default'}}" ng-click="filterInfos.two.a=!filterInfos.two.a;filterInfos.two.b=false;filterInfos.two.c=false">Pipelin</a>
                                        <a style="padding-right: 10px;padding-left: 10px" class="btn btn-{{filterInfos.two.b?'info':'default'}}" ng-click="filterInfos.two.a=false;filterInfos.two.b=!filterInfos.two.b;filterInfos.two.c=false">Upside</a>
                                        <a style="padding-right: 12px;padding-left: 12px" class="btn btn-{{filterInfos.two.c?'warning':'default'}}" ng-click="filterInfos.two.a=false;filterInfos.two.b=false;filterInfos.two.c=!filterInfos.two.c;">Forecast</a>
                                    </div>
                                </div>
                                <div class="">
                                    <div style="padding-right:0;padding-left: 0;margin-left:0;margin-top: 15px">
                                        <h6 style="margin-left: 0">所有:</h6>
                                    </div>
                                    <div class=" btn-group" style="margin-left: 0;margin-right: 0" >
                                        <a style="padding-right: 10px;padding-left: 10px" class="btn btn-{{filterInfos.three.a?'success':'default'}}" ng-click="filterInfos.three.a=!filterInfos.three.a;filterInfos.three.b=false;filterInfos.three.c=false">个人</a>
                                        <a style="padding-right: 10px;padding-left: 10px" class="btn btn-{{filterInfos.three.b?'info':'default'}}" ng-click="filterInfos.three.a=false;filterInfos.three.b=!filterInfos.three.b;filterInfos.three.c=false">公司</a>
                                        <a style="padding-right: 12px;padding-left: 12px" class="btn btn-{{filterInfos.three.c?'warning':'default'}}" ng-click="filterInfos.three.a=false;filterInfos.three.b=false;filterInfos.three.c=!filterInfos.three.c;">所有</a>
                                    </div>
                                </div>
                                <div class="">
                                    <div style="padding-right:0;padding-left: 0;margin-left:0;margin-top: 15px">
                                        <h6 style="margin-left: 0">性质:</h6>
                                    </div>
                                    <div class=" btn-group" style="margin-left: 0;margin-right: 0" >
                                        <a style="padding-right: 10px;padding-left: 10px" class="btn btn-{{filterInfos.four.a?'success':'default'}}" ng-click="filterInfos.four.a=!filterInfos.four.a;filterInfos.four.b=false">LEAD</a>
                                        <a style="padding-right: 10px;padding-left: 10px" class="btn btn-{{filterInfos.four.b?'info':'default'}}" ng-click="filterInfos.four.a=false;filterInfos.four.b=!filterInfos.four.b">OPP</a>
                                    </div>
                                </div>
                            </div>
                            <div ng-show="searchOrGuid&&toState.name!='opportunitylist'" style="margin-top: 15px">
                                <table class="table table-stats table-condensed table-striped table-sortable">
                                    <tr ng-repeat="item in opps|filter:infoFilter">
                                        <td ng-style="presentOppInfo!=undefined&&presentOppInfo.id==item.id?colorRed:colorDefault" ng-click="updatePresentOpp(item.id)">{{item.opportunity.oppName}}</td>
                                    </tr>
                                </table>
                            </div>
                            <div ng-show="!searchOrGuid&&toState.name!='opportunitylist'">
                                <div class="tabs-left" >
                                    <ul class="nav nav-tabs" style="width:100%">
                                        <li class="{{tabActive==1?'active':''}}"><a class="btn" ng-click="changeTabActive(1)">基本信息</a></li>
                                        <li class="{{tabActive==3?'active':''}}"><a class="btn" ng-click="changeTabActive(3)">相关任务</a></li>
                                        <li class="{{tabActive==4?'active':''}}"><a class="btn" ng-click="changeTabActive(4)">相关日程</a></li>
                                        <li class="{{tabActive==2?'active':''}}"><a class="btn" ng-click="changeTabActive(2)">新建机会</a></li>
                                        <li class=""><a class="btn" ng-click="changeTabActive(5)">返回列表</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-9">
                    <div data-ui-view="oppdetail">

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>